		<div class="topurl">
        	<span class="left">
            	Bạn đang xem: <a href="<?php echo base_url();?>"><b>Trang chủ</b></a>  &raquo; <a href="<?php echo base_url().'tu-van-hoi-dap'?>" class="current">Tư vấn - Hỏi đáp</a>
            </span>
            <span class="right">
            	<span>Hỗ trợ bán hàng:</span>
            	<?php if(isset($support) && $support != null) {?>
                <?php foreach($support as $k => $v) {?> 
            		<a href="ymsgr:sendim?<?php echo $v->yahoo;?>" title="<?php echo $v->yahoo;?>">	                            	
                    	<img src="http://opi.yahoo.com/online?u=<?php echo $v->yahoo;?>&t=1" title="Chat với <?php echo $v->yahoo;?>" alt="Chat với <?php echo $v->yahoo;?>" />
                    </a> 
            	<?php }?>
            	<?php }?>
                <img src="<?php echo img_link('i-phone.gif');?>" title="" alt="" /> <span><b>043 824 3536</b> | <b>0979 899 100</b></span>
            </span>
        </div>
        <div class="main">
        	<div id="sidebar">
            	<h2 class="help"><a href="<?php echo base_url().'huong-dan-mua-hang.html';?>">Hướng dẫn mua hàng</a></h2>                
                <?php if(isset($questions_usually) && $questions_usually !=null) {?>
                <div class="b-left-sp">                	
                	<span class="title">Câu hỏi thường gặp</span>
                    <ul class="sp-l">                                        
                    <?php foreach($questions_usually as $k => $v){?>
                    	<li><a href="<?php echo base_url().'tu-van-hoi-dap/detail/'.$v->id.'/'.$v->title_link.'.html';?>" title="<?php echo $v->title;?>"><?php echo $v->title;?></a></li>
                    <?php }?>                    
                    </ul>                    
                </div>
                <?php }?>
                
                <div class="b-sidebar">
                	<div class="titile-news">Sản phẩm bán chạy</div>
                    <ul class="list-sp">
                    	<?php if(isset($products_best_sales) && $products_best_sales != null) {?>
                    	<?php foreach($products_best_sales as $k => $v) {?>
                    	<li>
                    		<?php $img_path = $this->home_model->get_images_products_by_product_id($v->id);?>
                    		<?php if($img_path != null){?>
                    		<a href="<?php echo base_url().'gian-hang/detail/'.$v->id.'/'.$v->name_link.'.html';?>" title="<?php echo $v->name;?>">
                        		<img src="<?php echo show_thumb($img_path[0]->img_path,'65-34');?>" title="<?php echo $v->name;?>" alt="<?php echo $v->name;?>" class="thumb" />
                        	</a>
                        	<?php }?>
                            <span class="info"><a href="<?php echo base_url().'gian-hang/detail/'.$v->id.'/'.$v->name_link.'.html';?>"><?php echo $v->name;?></a><br /> <b><?php echo format_type_money($v->price);?> VND</b></span>
                        </li>
                        <?php }?>
                        <?php }?>                        
                    </ul>
                </div>
                <div class="btn-download"><a href="#"><img src="<?php echo img_link('i-download.gif');?>" alt="" title="" /></a></div>
            </div>
                     
            <div class="b-qa">
                <div class="b-qa-top">
                	<?php
		        		$attributes = array(
		        			"method"	=>	'get',
		        			"onsubmit"	=>	'search_questions(); return false;'
		        		);
		        		echo form_open("",$attributes);
		        	?>
                	<?php
			      	  $in_search = array(
			      	  	'name'	=>	'keyword',
			      	  	'id'	=>	'keyword',
			      	  	'class'	=>	'text',
			      	  	'value'	=> 	(isset($keyword) ? entities_to_ascii($keyword): '')
			      	  );
			      	?>                    
                	<input type="text" name="keyword" id="keyword" value="<?php echo (isset($keyword) ? entities_to_ascii($keyword): '');?>" class="text" />                    	
                    <input type="submit" name="submit" value="Tìm kiếm câu hỏi" class="btns" style="width:125px;"/>
		      	  	<?php echo form_close();?>
		      	  	
                    <a href="<?php echo base_url().'tu-van-hoi-dap/dat-cau-hoi';?>">
                    	<input type="button" name="" value="Đặt câu hỏi" class="btns" style="width:94px;" />
                    </a>
                </div>
                
                <ul class="list-qa">                
                <?php if(isset($all_questions) && $all_questions != null) {?>
                <?php foreach($all_questions as $k => $v){?>
                	<li <?php if($k%2 != 0) { echo "class=other"; };?>>
                    	<h2><a href="<?php echo base_url().'tu-van-hoi-dap/detail/'.$v->id.'/'.$v->title_link.'.html';?>" title="<?php echo $v->title;?>"><?php echo $v->title;?></a></h2>
                        <p><?php echo $v->contents;?></p>
                        <span class="date">Hỏi bởi: <?php echo $v->fullname;?>, ngày <?php echo date('d-m-Y', strtotime($v->date_create)); ?>
                        <?php $answer = $this->questions_model->get_answer_by_id_questions($v->id);?>                        
                        <?php if(isset($answer) && $answer != null){?> 
                        	<b>Đã có câu trả lời</b></span>	
                        <?php } else {?>
                        	<b>Chưa có câu trả lời</b>
                        <?php }?>
                    </li>                    
                <?php }?>    
                <?php } else {?>
                <font color="red">Không tìm thấy kết quả phù hợp</font>
                <?php }?>    
                </ul>
                <div class="pagination panaging">
                    <?php echo $pagnav;?>
                </div>
            </div>
        </div>